package com.deng.test.exception;

/**
 * 自定义业务异常类型
 *
 * @author deng
 * @version 1.0
 * @since 2025/8/8 14:16
 */
public abstract class CustomException extends RuntimeException {
    private final String message;

    //返回模块名称
    abstract String getModeType();

    public CustomException(String message) {
        this.message = message;

    }

    @Override
    public String getMessage() {
        return getModeType() + ":" + message;
    }

    @Override
    public String getLocalizedMessage() {
        return this.getMessage();
    }
}
